Note: This tutorial assumes you have completed previous tutorial siemens_cp1616/Tutorials/Introduction to siemens_cp1616.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

CP1616 in IO Controller mode - Configuration

Description: This tutorial teaches you how to configure PROFINET communication with CP1616 in IO Controller mode. Simple TIA Portal example project using PLC S7-1200 is included

Keywords: SIEMENS, PROFINET, CP1616

Tutorial Level: INTERMEDIATE

Next Tutorial: siemens_cp1616/Tutorials/CP1616 in IO Controller mode - User Node

TIA Portal configuration

Full archive of tutorial TIA Portal project is available here. (Please use "Project/Retrieve" option to extract the files)

Lets assume that we have successfully configured PROFINET network including S7-1200 and CP1616 in TIA Portal:

CP1616_IO_Controller_config.png

and we would like to transfer following data between IO Device (PLC) and IO Controller (CP1616):

IO-Controller-config1.png

In order to achieve that, configuration of Transfer areas needs to be passed into ROS wrapper by .yaml file first.

Yaml file

For "Transfer areas" as shown in the picture above, appropriate .yaml file will have following structure:

- label: CP_input_byte
  type: input
  size: 1
  starting_address: 4116
  topic: cp_input_byte_topic

- label: CP_output_byte
  type: output
  size: 1
  starting_address: 4120
  topic: cp_output_byte_topic

- label: CP_input_real
  type: input
  size: 4
  starting_address: 4124
  topic: cp_input_real_topic

- label: CP_output_real
  type: output
  size: 4
  starting_address: 4128
  topic: cp_output_real_topic

- label: CP_input_byte_array
  type: input
  size: 8
  starting_address: 4132
  topic: cp_input_byte_array_topic

- label: CP_output_byte_array
  type: output
  size: 8
  starting_address: 4136
  topic: cp_output_byte_array_topic

Launch file

.yaml filepath needs to be uploaded on ROS Parameter server. User node can also be added to the launch file here:

<launch>

  <!--   Load yaml config filepath on rosparam server -->
  <param name="filepath" value="$(find siemens_cp1616_io_controller_tutorial)/config/siemens_cp1616_io_controller_tutorial_config.yaml"/>

  <!--   Wrapper node  -->
  <node
    name="siemens_cp1616_io_controller_wrapper"
    pkg="siemens_cp1616"
    type="io_controller_wrapper"
    output="screen" />

  <!--   User node -->
  <node
    name="siemens_cp1616_io_controller_tutorial"
    pkg="siemens_cp1616_io_controller_tutorial"
    type="siemens_cp1616_io_controller_tutorial_node"
    output="screen" />

</launch>

After completing configuration we can move to interfacing PROFINET from code and start creating simple ROS node.

Next tutorial: CP1616 in IO Controller mode - User node

Wiki: siemens_cp1616/Tutorials/CP1616 in IO Controller mode - Configuration (last edited 2016-08-23 19:00:55 by FrantisekDurovsky)